﻿<UserControl x:Class="LiSAClient.WpfClient.View.Projects.ProjectsOverview"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <DataGrid Name="ProjectOverviewDataGrid" ItemsSource="{Binding Projects, Mode=TwoWay, IsAsync=True}"  Style="{StaticResource DataGridStyle}"
                      AutoGenerateColumns="False" IsReadOnly="True" IsSynchronizedWithCurrentItem="True" SelectionMode="Single" SelectionUnit="FullRow" 
                     SelectedItem="{Binding SelectedProjectShortInfo, Mode=TwoWay}">
            <DataGrid.Columns>
                <DataGridTextColumn Width="2*" HeaderStyle="{StaticResource DgchStyle}" Binding="{Binding ProjectTitle}" Header="Title" ElementStyle="{StaticResource DataGridTextColumnElementStyle}"/>
                <DataGridTextColumn Width="2*" HeaderStyle="{StaticResource DgchStyle}" Binding="{Binding ProjectDescription}" Header="Description" ElementStyle="{StaticResource DataGridTextColumnElementStyle}" />
                <DataGridTextColumn Width="*" HeaderStyle="{StaticResource DgchStyle}" Binding="{Binding ProjectLead.FullName}" Header="Project Lead" ElementStyle="{StaticResource DataGridTextColumnElementStyle}" />
            </DataGrid.Columns>
                <DataGrid.InputBindings>
                <MouseBinding Gesture="LeftDoubleClick" Command="{Binding ShowProject}"/>
            </DataGrid.InputBindings>
        </DataGrid>
    </Grid>
</UserControl>
